#include <iostream>
#include "client.h"
using namespace std;
int main(int argc, char *argv[]){
  //init the env
  struct client_thread_ctx *ctx = api_main_thread_init(argc, argv);
  Addr dsm;
  string s;
  int a;
  while(cin>>s){
    if(s == "ad"){
      cin>>s>>a;
      cout<<"name "<<s<<" size "<<a<<endl;
      dsm = api_alloc_dsm(ctx, s.c_str(), a);
    }
  }
  return 0;
}